package com.kingdee.was.custom.bounced.handler;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.log4j.Logger;
import org.springframework.ui.ModelMap;

import com.kingdee.bos.Context;
import com.kingdee.eas.basedata.org.AdminOrgUnitInfo;
import com.kingdee.eas.util.app.ContextUtil;
import com.kingdee.jdbc.rowset.IRowSet;
import com.kingdee.shr.ats.web.handler.AtsLeaveBillEditHandler;
import com.kingdee.shr.base.syssetting.context.SHRContext;
import com.kingdee.shr.base.syssetting.exception.SHRWebException;
import com.kingdee.shr.base.syssetting.web.json.JSONUtils;

/**
 * 
 * Title: BouncedHandler Description:后台向前台传值
 * 
 * @author saisai_cheng Email:854296216@qq.com
 * @date 2019-7-30
 */
public class BouncedHandler extends AtsLeaveBillEditHandler {

	@SuppressWarnings("unused")
	private static Logger logger = Logger
			.getLogger("com.kingdee.was.custom.bounced.handler.BouncedHandler");

	private Context ctx;

	public BouncedHandler(Context ctx) {
		this.ctx = ctx;
	}

	public BouncedHandler() {
		this.ctx = SHRContext.getInstance().getContext();
	}

	@SuppressWarnings("unchecked")
	public void passValueAction(HttpServletRequest request,
			HttpServletResponse response, ModelMap model)
			throws SHRWebException {

		AdminOrgUnitInfo info = ContextUtil.getCurrentAdminUnit(ctx);
		String cfsszzid = info.getId().toString();
		System.out.println("当前登录人组织ID" + cfsszzid);
		@SuppressWarnings("unused")
		String holidaySystem = null;

		@SuppressWarnings("unused")
		IRowSet rowSet = null;

		Map map = new HashMap();

		StringBuffer sb = new StringBuffer();

		sb
				.append("select fnumber,fname_l2,cfsszzid,cfjqzd as jqzd FROM CT_MP_Jqzd where cfsszzid =");
		sb.append("'" + cfsszzid + "'");
		System.out.println("============查询假期制度sql:" + sb.toString()
				+ "===========");

		/*
		 * try { rowSet = DbUtil.executeQuery(ctx, sb.toString()); while
		 * (rowSet.next()) { holidaySystem = rowSet.getString("jqzd");
		 * if(holidaySystem!=null&&!"".equals(holidaySystem)){
		 * map.put("holidaySystem", holidaySystem); }
		 * 
		 * }
		 * 
		 * 
		 * 
		 * } catch (BOSException e) { logger.error("系统有误，请联系管理员..."); } catch
		 * (SQLException e) { logger.error("系统有误，请联系管理员..."); }
		 */

		String test = "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈" + "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈"
				+ "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈" + "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈"
				+ "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈" + "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈"
				+ "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈" + "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈"
				+ "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈" + "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈"
				+ "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈" + "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈"
				+ "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈" + "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈"
				+ "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈" + "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈"
				+ "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈" + "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈"
				+ "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈" + "" + "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈"
				+ "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈" + "" + "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈"
				+ "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈" + "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈"
				+ "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈" + "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈"
				+ "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈" + "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈"
				+ "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈" + "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈"
				+ "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈" + "" + "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈"
				+ "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈" + "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈"
				+ "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈" + "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈"
				+ "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈" + "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈"
				+ "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈" + "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈"
				+ "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈" + "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈"
				+ "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈" + "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈"
				+ "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈" + "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈"
				+ "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈" + "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈"
				+ "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈" + "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈"
				+ "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈" + "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈"
				+ "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈" + "" + "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈"
				+ "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈" + "" + "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈"
				+ "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈" + "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈"
				+ "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈" + "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈"
				+ "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈" + "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈"
				+ "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈" + "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈"
				+ "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈" + "" + "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈"
				+ "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈" + "假期制度假期制度啦啦啦啦啦啦啦啦哈哈哈哈哈哈哈哈";
		map.put("holidaySystem", test);
		JSONUtils.SUCCESS(map);
	}
}
